package cn.edu.scujcc.customofsichuan;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

public class Second_dafojie extends AppCompatActivity implements View.OnClickListener {

    Toolbar back;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second_dfj);
        back=findViewById(R.id.back_secondPage_dfj);
        back.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        View dfj_history = findViewById(R.id.dfj_history);
        View dfj_protect = findViewById(R.id.dfj_protect);
        View dfj_structure = findViewById(R.id.dfj_structure);
        dfj_history.setOnClickListener(this);
        dfj_protect.setOnClickListener(this);
        dfj_structure.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        Intent intent=new Intent(this,thirdPage_Detail.class);
        Bundle bundle = new Bundle();
        switch (view.getId()){
            case R.id.dfj_history:
                bundle.putString("title","大佛节简介");
                bundle.putString("webUrl","file:///android_asset/dfj_history.html");
                intent.putExtras(bundle);
                startActivity(intent);
                break;
            case R.id.dfj_protect:
                bundle.putString("title","大佛节文物保护");
                bundle.putString("webUrl","file:///android_asset/dfj_protect.html");
                intent.putExtras(bundle);
                startActivity(intent);
                break;
            case R.id.dfj_structure:
                bundle.putString("title","大佛节文物保护");
                bundle.putString("webUrl","file:///android_asset/dfj_structure.html");
                intent.putExtras(bundle);
                startActivity(intent);
                break;

        }

    }
}